Civil Servants (PNS) are Indonesian citizens who have certain conditions and are given the mandate to be a State Civil Apparatus on a permanent basis and are not bound by a contract to carry out their assigned duties and positions. There is a view that states that civil servants have useful guarantees in the future and there is no contract system in work. Each government has civil servants with different groups. This study aims to group the central civil servants according to agencies and groups in Pematangsiantar. In completing this research, it was carried out using the k-means algorithm. The data used in the study came from the Central Statistics Agency (BPS) by processing the data into 3 clusters, namely high, medium, and low. The results of this study indicate that the k-means algorithm can be applied in determining the grouping of Central Civil Servants by Agencies and Groups in Pematangsiantar with the results that 1 item is high (C1), 4 items are medium (C2), and 21 items are low (C3).